# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=difftastic
pkgver=0.53.1
pkgrel=0
pkgdesc="Diff tool that understands syntax"
url="https://difftastic.wilfred.me.uk/"
license="MIT"
arch="all"
makedepends="cargo openssl-dev cargo-auditable"
options="net"
source="https://github.com/Wilfred/difftastic/archive/$pkgver/difftastic-$pkgver.tar.gz"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/difft -t "$pkgdir"/usr/bin/
}

sha512sums="
7df72cef440372bb042937b7b8b1d333984f8dadec79697295c0760dc84f159d0c122ffc53619bae6b52a2885a4a609155d2b7d9d2ebc88ee34a7c4548cf791c  difftastic-0.53.1.tar.gz
"
